Skip to content

TilemapChunk single quad; TileData (color/visibility) #19924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ConnerPetzold
Copy link
Contributor

Objective

  • Use a single quad to render a TilemapChunk
  • Add support for tile color and visibility

Testing

  • Tested using example -- there doesn't appear to be any visual tile bleeding or rounding issues. Open to ideas on further testing

@ConnerPetzold ConnerPetzold force-pushed the tilemap-chunk-single-quad branch from 058304a to edbc343 Compare July 2, 2025 03:36
@alice-i-cecile alice-i-cecile added the A-Rendering Drawing game state to the screen label Jul 2, 2025
@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible M-Needs-Release-Note Work that should be called out in the blog due to impact S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 2, 2025
@alice-i-cecile alice-i-cecile added this to the 0.17 milestone Jul 2, 2025
Copy link
Contributor

github-actions bot commented Jul 2, 2025

It looks like your PR has been selected for a highlight in the next release blog post, but you didn't provide a release note.

Please review the instructions for writing release notes, then expand or revise the content in the release notes directory to showcase your changes.

@atlv24 atlv24 self-requested a review July 8, 2025 19:59
@ConnerPetzold ConnerPetzold force-pushed the tilemap-chunk-single-quad branch from edbc343 to 5e026ef Compare July 8, 2025 20:11
@ConnerPetzold ConnerPetzold force-pushed the tilemap-chunk-single-quad branch 3 times, most recently from aa512c7 to 606bcb4 Compare July 9, 2025 06:41
@ConnerPetzold ConnerPetzold force-pushed the tilemap-chunk-single-quad branch from 606bcb4 to e9c1e1a Compare July 14, 2025 13:54
@ConnerPetzold ConnerPetzold requested a review from atlv24 July 16, 2025 03:01
@@ -60,10 +54,36 @@ pub struct TilemapChunk {
pub alpha_mode: AlphaMode2d,
}

#[derive(Clone, Copy, Debug)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc strings please.

}

impl TileData {
pub fn from_index(index: u16) -> Self {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc strings, ideally linking to where you get this index from.

fn default() -> Self {
Self {
tileset_index: 0,
color: Color::WHITE,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a default of white rather than black or our standard missing data magenta?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think white is the standard default for tinting, since you're effectively leaving the original pixel color untouched. Maybe it makes sense for it to be optional though?

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core idea is good, but needs more docs :) The default color choice is classic bikeshedding; feel free to leave it as white if you think that's best.

Once that's done I'll test it locally then approve.

@alice-i-cecile alice-i-cecile added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible M-Needs-Release-Note Work that should be called out in the blog due to impact S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

5 participants